package cn.tworice.admin.web;


import cn.tworice.admin.service.WechatExplosiveTextService;
import cn.tworice.common.vo.RequestResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;

@RestController
@RequestMapping("WechatExText")
@Slf4j
@CrossOrigin
public class WechatExplosiveTextController {
    @Autowired
    private WechatExplosiveTextService wechatExplosiveTextService;
    @GetMapping("addText")
    public RequestResult addText() throws Exception {
        RequestResult result = new RequestResult();
        //调用service
        wechatExplosiveTextService.NewsAutomation();
        System.out.println("请求成功，生成爆文成功");
        return result;
    }



}
